<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>
<body>
	<div id="app">
		<a v-bind:href="url">百度</a>
		<button v-on:click='handle'>切换</button>
		<!-- 属性绑定的简写形式 -->
		<a :href="url">百度2</a>
	</div>
		<script type="text/javascript" src="js/vue.js"></script>
	<script type="text/javaScript">
		// 属性绑定

		var vm = new Vue({
			el: "#app",
			data: {
				url: 'http://www.baidu.com'
			},
			methods: {
				handle() {
					// 修改url的地址
					this.url = 'http://itcast.cn';
				}
			}
		})

	</script>
</body>
</html>